Integrand size = 31, antiderivative size = 31 \[ \int \frac {\sec ^2(c+d x)}{a \cos (c+d x)+i a \sin (c+d x)} \, dx=\frac {\text {arctanh}(\sin (c+d x))}{a d}-\frac {i \sec (c+d x)}{a d} \]
[Out]
Time = 0.11 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.161, Rules used = {3171, 3169, 3855, 2686, 8} \[ \int \frac {\sec ^2(c+d x)}{a \cos (c+d x)+i a \sin (c+d x)} \, dx=\frac {\text {arctanh}(\sin (c+d x))}{a d}-\frac {i \sec (c+d x)}{a d} \]
[In]
[Out]
Rule 8
Rule 2686
Rule 3169
Rule 3171
Rule 3855
Rubi steps \begin{align*} \text {integral}& = -\frac {i \int \sec ^2(c+d x) (i a \cos (c+d x)+a \sin (c+d x)) \, dx}{a^2} \\ & = -\frac {i \int (i a \sec (c+d x)+a \sec (c+d x) \tan (c+d x)) \, dx}{a^2} \\ & = -\frac {i \int \sec (c+d x) \tan (c+d x) \, dx}{a}+\frac {\int \sec (c+d x) \, dx}{a} \\ & = \frac {\text {arctanh}(\sin (c+d x))}{a d}-\frac {i \text {Subst}(\int 1 \, dx,x,\sec (c+d x))}{a d} \\ & = \frac {\text {arctanh}(\sin (c+d x))}{a d}-\frac {i \sec (c+d x)}{a d} \\ \end{align*}
Time = 0.40 (sec) , antiderivative size = 35, normalized size of antiderivative = 1.13 \[ \int \frac {\sec ^2(c+d x)}{a \cos (c+d x)+i a \sin (c+d x)} \, dx=-\frac {i \left (2 i \text {arctanh}\left (\sin (c)+\cos (c) \tan \left (\frac {d x}{2}\right )\right )+\sec (c+d x)\right )}{a d} \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 64 vs. \(2 (30 ) = 60\).
Time = 0.59 (sec) , antiderivative size = 65, normalized size of antiderivative = 2.10
method | result | size |
norman | \(\frac {2 i}{a d \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )}+\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{a d}-\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{a d}\) | \(65\) |
derivativedivides | \(\frac {\frac {2 i}{2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-2}-\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )-\frac {i}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1}+\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{a d}\) | \(70\) |
default | \(\frac {\frac {2 i}{2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-2}-\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )-\frac {i}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1}+\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{a d}\) | \(70\) |
risch | \(-\frac {2 i {\mathrm e}^{i \left (d x +c \right )}}{d a \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}+\frac {\ln \left (i+{\mathrm e}^{i \left (d x +c \right )}\right )}{a d}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{a d}\) | \(74\) |
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 80 vs. \(2 (29) = 58\).
Time = 0.24 (sec) , antiderivative size = 80, normalized size of antiderivative = 2.58 \[ \int \frac {\sec ^2(c+d x)}{a \cos (c+d x)+i a \sin (c+d x)} \, dx=\frac {{\left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right )} \log \left (e^{\left (i \, d x + i \, c\right )} + i\right ) - {\left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right )} \log \left (e^{\left (i \, d x + i \, c\right )} - i\right ) - 2 i \, e^{\left (i \, d x + i \, c\right )}}{a d e^{\left (2 i \, d x + 2 i \, c\right )} + a d} \]
[In]
[Out]
\[ \int \frac {\sec ^2(c+d x)}{a \cos (c+d x)+i a \sin (c+d x)} \, dx=\frac {\int \frac {\sec ^{2}{\left (c + d x \right )}}{i \sin {\left (c + d x \right )} + \cos {\left (c + d x \right )}}\, dx}{a} \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 83 vs. \(2 (29) = 58\).
Time = 0.22 (sec) , antiderivative size = 83, normalized size of antiderivative = 2.68 \[ \int \frac {\sec ^2(c+d x)}{a \cos (c+d x)+i a \sin (c+d x)} \, dx=\frac {\frac {\log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{a} - \frac {\log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{a} - \frac {2}{-i \, a + \frac {i \, a \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}}}{d} \]
[In]
[Out]
none
Time = 0.29 (sec) , antiderivative size = 58, normalized size of antiderivative = 1.87 \[ \int \frac {\sec ^2(c+d x)}{a \cos (c+d x)+i a \sin (c+d x)} \, dx=\frac {\frac {\log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}{a} - \frac {\log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )}{a} + \frac {2 i}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )} a}}{d} \]
[In]
[Out]
Time = 23.16 (sec) , antiderivative size = 43, normalized size of antiderivative = 1.39 \[ \int \frac {\sec ^2(c+d x)}{a \cos (c+d x)+i a \sin (c+d x)} \, dx=\frac {2\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{a\,d}+\frac {2{}\mathrm {i}}{a\,d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-1\right )} \]
[In]
[Out]